<div class="modal-content">
  <div class="modal-header">
    <h5 class="modal-title">{{ plugin.displayName || plugin.name }}</h5>
    <button
      type="button"
      class="btn-close"
      data-bs-dismiss="modal"
      [attr.aria-label]="'form.button_close' | translate"
      (click)="dismissModal()"
      [disabled]="midAction"
    ></button>
  </div>
  <div class="modal-body d-flex flex-row flex-grow-1 w-100 p-0">
    <div #pluginlogoutput class="w-100 bg-black plugin-log-output terminal align-self-end w-100 h-100 mb-0 p-2"></div>
  </div>
  <div class="modal-footer justify-content-between">
    <div class="text-start">
      <button
        type="button"
        class="btn btn-elegant"
        data-bs-dismiss="modal"
        (click)="dismissModal()"
        [attr.aria-label]="'form.button_close' | translate"
        [disabled]="midAction"
      >
        {{ 'form.button_close' | translate }}
      </button>
    </div>
    <div class="text-center"></div>
    <div class="text-end">
      <button
        class="btn btn-primary"
        (click)="downloadLogFile()"
        [attr.aria-label]="'logs.title_download_log_file' | translate"
        [ngbTooltip]="'logs.title_download_log_file' | translate"
        container="modal"
        placement="top"
        [openDelay]="150"
        triggers="hover"
        [disabled]="midAction"
      >
        <i class="fas fa-download"></i>
      </button>
      @if (childBridges.length) {
      <button
        class="btn btn-danger ms-3"
        (click)="restartChildBridges()"
        [attr.aria-label]="(childBridges.length > 1 ? 'child_bridge.restart_plural' : 'child_bridge.restart') | translate"
        [ngbTooltip]="(childBridges.length > 1 ? 'child_bridge.restart_plural' : 'child_bridge.restart') | translate"
        container="modal"
        placement="top"
        [openDelay]="150"
        triggers="hover"
        [disabled]="midAction"
      >
        <i class="fas fa-power-off"></i>
      </button>
      }
    </div>
  </div>
</div>
